<template>
	<view v-if="show">
		<view class="cu-list menu-avatar comment radius-xl">
			<view class="cu-item" v-for="(item,index) in list" :key="index">
				<template v-if="item.anony === 1">
					<view class="cu-avatar round cuIcon-peoplefill"></view>
				</template>
				<template v-else>
					<view class="cu-avatar round" :style="{ backgroundImage: $baseUrl + item.member.avatar_url }"></view>
				</template>

				<view class="content">
					<view class="nickNameandTime">
						<view class="nickBox">
							<view class="text-black nickName">{{item.anony === 1? '匿名用户' : item.member.nickname}}</view>
							<view class="text-sm score">
								<text class="cuIcon-favorfill text-orange padding-left-mn" v-for="(it,indexs) in item.score" :key="indexs"></text>
							</view>
						</view>

						<view class="text-gray text-df">{{item.create_time || '' }}</view>
					</view>
					<view class="text-gray text-content text-df">
						{{item.comment || ''}}
					</view>
					<view class="tag flex flex-wrap padding-top-sm">
						<view v-for="(item,index) in item.tags" :key="index" class="padding-right-xs">
							<view class='cu-tag radius'>
									{{item}}
							</view>
						</view>
					</view>
					<view class="bg-grey padding-xs radius margin-top-xs  text-sm light" v-if="item.is_reply == 10">
						<view class="flex">
							<view>客服回复：</view>
							<view class="flex-sub">{{item.partner_reply}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			list:{
				type: [Array,Object],
				default: () => [],
			},
			show:{
				type: Boolean,
				default: false,
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="less" scoped>
.comment{
	.content{
		.nickNameandTime{
			display: flex;
			justify-content: space-between;
			.nickBox{
				display: flex;
				justify-content: flex-start;
				// .nickName{
				// 	display: inline-block;
				// }
				// .score{
				// 	display: inline-block;
				// }
			}
		}
	}
}
</style>
